#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    int n = 0;
    int i = 0;
    double sum = 0;
    double sum1 = 0;
    double sum2 = 0;
    scanf("%d", &n);
    for (i = 1; i <= n; i++)
    {
        if (i % 2 == 0)
        {
            sum = sum-i;
            
        }
        else
        {
            sum1 = sum1 + i;
        }
    }
    if (n == 1)
    {
        printf("1.000\n");
    }
    else
    {
        sum2 = 1 + 1.0 / sum + 1.0 / sum1;
        printf("%.3lf\n", sum2);
    }
    return 0;
}

int main()
{
    int n = 0;
    int i = 0;
    int sum = 0;
    int sum1 = 0;
    scanf("%d", &n);
    for (i = 1; i <= n; i++)
    {
        sum = sum + i;
        sum1 += sum;
    }

    printf("%d\n", sum1);
    return 0;
}

int main()
{
    int n = 0;
    int i = 0;
    int sum = 0;
    scanf("%d", &n);
    while (9 < n)
    {
        sum = sum + n % 10;
        n = n / 10;
        if (n < 10)
        {
            sum = sum + n;
        }
    }
    printf("%d\n", sum);
    return 0;
}
int main()
{
    int n = 0;
    int count = 0;
    scanf("%d", &n);
    while (1)
    {
        if (n % 2 == 0)
        {
            n = n / 2;
            count++;
        }
        else
        {
            n = n * 3 + 1;
            count++;
        }
        if (n == 1)
            break;
    }
    printf("%d\n", count);
    return 0;
}

int main()
{
    int i = 0;
    int count = 0;
    for (i = 9; i <= 2019; i++)
    {
        if (i % 10 == 9 || i / 10 % 10 == 9 || i / 100 % 10 == 9)
        {
            count++;
        }
    }
    printf("%d\n", count);
    return 0;
}

int main()
{
    int n = 0;
    int i = 0;
    scanf("%d", &n);

    int a = 0;
    int b = 0;
    int c = 0;
    int s = 0;
    for (i = 0; i < n; i++)
    {
        scanf("%d %d %d", &a, &b, &c);
        if ((a + b + c) / 3 < 60)
        {
            s = s + 1;
        }
    }
    printf("%d\n", s);
}